<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ page import="zhcms.admin.*" %>
<%
request.setCharacterEncoding("utf-8");
String action=request.getParameter("action");
%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    
    <title></title>
   
<meta http-equiv=Content-Type content=text/html; charset=utf-8>
<title></title>
<style type=text/css>
<!--
BODY{
	margin:0px;
	FONT-SIZE: 12px;
	FONT-FAMILY:  "宋体", "Verdana", "Arial", "Helvetica", "sans-serif";
	background-color: #799AE1;
	scrollbar-face-color: #DEE3E7;
	scrollbar-highlight-color: #FFFFFF;
	scrollbar-shadow-color: #DEE3E7;
	scrollbar-3dlight-color: #D1D7DC;
	scrollbar-arrow-color:  #006699;
	scrollbar-track-color: #EFEFEF;
	scrollbar-darkshadow-color: #98AAB1;
}
table  { border:0px; }
td  { font:normal 12px 宋体; }
img  { vertical-align:bottom; border:0px; }
a  { font:normal 12px 宋体; color:#000000; text-decoration:none; }
a:hover  { color:#428EFF;text-decoration:underline; }
.sec_menu  { border-left:1px solid white; border-right:1px solid white; border-bottom:1px solid white; overflow:hidden; background:#D6DFF7; }
.menu_title  { }
.menu_title span  { position:relative; top:2px; left:8px; color:#215DC6; font-weight:bold; }
.menu_title2  { }
.menu_title2 span  { position:relative; top:2px; left:8px; color:#428EFF; font-weight:bold; }
input,select,Textarea{
font-family:宋体,Verdana, Arial, Helvetica, sans-serif; font-size: 12px;}
}
-->
</style>

<script src="./js/jquery-1.4.2.js" type="text/javascript"></script>
<SCRIPT language=javascript1.2>
function showsubmenu(sid)
{
whichEl = eval("submenu" + sid);
//whichEl = $("#"+sid);
if (whichEl.style.display == "none")
{
eval("submenu" + sid + ".style.display=\"\";");
}
else
{
eval("submenu" + sid + ".style.display=\"none\";");
}
}
</SCRIPT>
  </head>
  
<BODY leftmargin="0" topmargin="0" marginheight="0" marginwidth="0">
<% 
GyUserLoginValidate gycheck=new GyUserLoginValidate();
int ischeck=gycheck.UserLoginValidate(request, response);
if(ischeck==0)
{
		try{
		out.println("<script language='javascript'>alert('对不起！，您还没有登陆');location.href=\"index.jsp\";</script>");
		}
		catch(Exception e){
			e.printStackTrace();
		}
}
%>
<table width=100% cellpadding=0 cellspacing=0 border=0 align=left> 
	<tr>
		<td valign=top>
		<table cellpadding=0 cellspacing=0 width=158 align=center>
			<tr> 
				<td height=42 valign=bottom> <img src="images/admin_title.gif" width=158 height=38> </td>
			</tr>
		</table>
		<table cellpadding=0 cellspacing=0 width=158 align=center>
			<tr>         
				<td height=25 class=menu_title onmouseover=this.className='menu_title2'; onmouseout=this.className='menu_title'; background=images/title_bg_quit.gif  > <span><a href="main.jsp"  target="main"><b>管理首页</b></a> | <a href="loginquit.jsp" target=_top onclick="{if(confirm('确定退出吗?')){return true;}return false;}"><b>退出</b></a></span> </td>
		    </tr>
		</table>
    <br>
	<!--后台菜单开始-->
<% 
GySystemMenu gysm=new GySystemMenu();
ArrayList<HashMap<String, String>> gysmClass=new ArrayList<HashMap<String, String>>();
gysmClass=gysm.getMenuClass();
for(int i=0;i<gysmClass.size();i++)
{
	Map<String,String> smClass=new HashMap<String,String>();
	smClass=gysmClass.get(i);
%>
	<table cellpadding=0 cellspacing=0 width=158 align=center>
		<tr>         
			<td height=25 class=menu_title onmouseover=this.className='menu_title2'; onmouseout=this.className='menu_title'; background="images/admin_left_<%=i%>.gif" id=menuTitle1 onclick="showsubmenu(<%=i%>)"> <span><%=smClass.get("name")%></span></td>
		</tr>
		<tr> 
				<%
				if(i==0)
				{
				 %>
				<td style="display:" id='submenu<%=i%>'>
				<% 
				}
				else
				{
				%>
				<td style="display:none" id='submenu<%=i%>'>
				<% 
				}
				%>	
				<div class=sec_menu style="width:158">
				<%
					ArrayList<HashMap<String, String>> gysmBoard=new ArrayList<HashMap<String, String>>();
					gysmBoard=gysm.getMenuBoard(Integer.parseInt(smClass.get("id")));
					
					for(int j=0;j<gysmBoard.size();j++)
					{
						Map<String,String> smBoard=new HashMap<String,String>();
						smBoard=gysmBoard.get(j);
				 %>
				<table cellpadding=0 cellspacing=0 align=center width=135>
					<tr> 
						<td height=20 align=left><img src="images/ico.gif"><a href="<%=smBoard.get("url")%>" target="main"><%=smBoard.get("name")%></a></td>
					</tr>
	            </table>
	     			<%
	     			}
	     			 %>
		        </div>
				<div  style="width:158"> 
					<table cellpadding=0 cellspacing=0 align=center width=135>
						<tr>                
							<td height=10></td>
						</tr>
					</table>
				</div>
				</td>
			</tr>
		</table>
<%
}

//插件菜单开始

GyPlus pluslist=new GyPlus();
ArrayList<HashMap<String, String>> gyPlusList=new ArrayList<HashMap<String, String>>();
gyPlusList=pluslist.getManagerList();
if(gyPlusList.size()>0)
{
int cji=gysmClass.size();

 %>
 <table cellpadding=0 cellspacing=0 width=158 align=center>
		<tr>         
			<td height=25 class=menu_title onmouseover=this.className='menu_title2'; onmouseout=this.className='menu_title'; background="images/admin_left_<%=cji%>.gif" id=menuTitle1 onclick="showsubmenu(<%=cji%>)"> <span>插件内容管理列表</span></td>
		</tr>
		<tr> 
				<td style="display:none" id='submenu<%=cji%>'>
	
				<div class=sec_menu style="width:158">
				<%
					for(int j=0;j<gyPlusList.size();j++)
					{
						Map<String,String> smpluslist=new HashMap<String,String>();
						smpluslist=gyPlusList.get(j);
				 %>
				<table cellpadding=0 cellspacing=0 align=center width=135>
					<tr> 
						<td height=20 align=left><img src="images/ico.gif"><a href="<%=smpluslist.get("managerurl")%>" target="main"><%=smpluslist.get("managername")%></a></td>
					</tr>
	            </table>
	     			<%
	     			}
	     			 %>
		        </div>
				<div  style="width:158"> 
					<table cellpadding=0 cellspacing=0 align=center width=135>
						<tr>                
							<td height=10></td>
						</tr>
					</table>
				</div>
				</td>
			</tr>
		</table>
 
 <%
 }
  %>
	<!--后台菜单结束-->    
<table cellpadding=0 cellspacing=0 width=158 align=center>
	<tr>         
		<td height=25 class=menu_title onmouseover=this.className='menu_title2'; onmouseout=this.className='menu_title'; background="images/admin_left_12.gif" id=menuTitle1> <span>系统信息</span> </td>
    </tr>
    <tr> 
	    <td> <div class=sec_menu style="width:158"> 
	    <table cellpadding=0 cellspacing=0 align=center width=135>
			<tr>
				<td height=20>&nbsp;<br>版权所有：<BR><a href="http://www.guogege.net/" target=_blank>格格工作室(www.<font face=Verdana, Arial, Helvetica, sans-serif>guogege.net<font color=#CC0000>.Net</font></font>)</a><BR><BR>
				</td>
			</tr>
		</table>
        </div></td>
    </tr>
</table>
</table>
</body>
</html>
